package edu.java.lectures.lec09.exceptions.hierarchy;

import edu.java.lectures.lec09.exceptions.creation.MySubException;
import edu.java.lectures.lec09.exceptions.creation.MySubSubException;

public class ExceptionOverridingTest {

    public static void main(String[] args) {
	// MySubClass mySubClass = new MySubClass();
	MyClass myClass = new MySubClass();

	try {
	    myClass.doSomething1();
	} catch (MySubSubException msse) {
	    System.out.println("MySubSubException handling: "
		    + msse.getMessage());
	} catch (MySubException mse) {
	    System.out.println("MySubException handling: " + mse.getMessage());
	}
	System.out.println("End of the test.");
    }
}
